#ifndef __SHAREDTOP
#define __SHAREDTOP

#include <stdio.h>
#include <string.h>

#define MAXLENGTH 1024

class SharedTop
{
public:
	SharedTop()
	{
		maxlength = MAXLENGTH;
	}

	void init()
	{
		maxlength = MAXLENGTH;
	}

	void _message(char * msg, int len)
	{
		if (len > maxlength) return;
		length = len;
		strcpy(message, msg);		 
	}

	char * _message()
	{
		return message;
	}

private:
	char message[MAXLENGTH];
	int length;
	int maxlength;

};

#endif